Accusoft.TwainPro9.ActiveX
Access Extended Image Information

What is Extended Image Information?

Extended image information is used to pass information such as barcodes or patch codes found on a scanned page. See the TWAIN specification for additional information on Extended Image Information available for retrieval.

The TWAIN Data Source must be compliant with version 1.7 or higher of the TWAIN specification for accessing this extended information.

The property EnableExtendedImageInfo must be set to true to access the extended image information. This should be done after the TwainPro control is first created.

Access Extended Image Information

The extended image information is populated with the values from the Twain Data Source during the PostScan Event by calling the GetExtendedImageInfo method.

Getting extended image information values is done in the same manner as getting the values for a capability. The CapValue, CapString, CapItem, and CapItemString properties provide the means to retrieve the value for each element in the array that was previously set up. To access each element, the program must move through the array by using the CapExtInfoIndex property.

The CapType property can be used to determine whether the returned information is a single value or an array of values. This can also be determined by looking at the property CapNumItems. A value of one for CapNumItems means a single item has been returned, which is the same as CapType being equal to TWON_ONEVALUE. A value greater than one for CapNumItems is the same as CapType being equal to TWON_ARRAY. These are the only values that CapType can be for extended image information. To determine if the TWAIN Data Source was able to fill in any value then the CapSupported function can be used.

VB Example
Copy Code
' This code demonstrates how to access the previously requested extended image information
' Get the Barcode Count
Private Sub TwainPRO_PostScan(Cancel As Boolean)
   TwainPRO.GetExtendedImageInfo(TWEI_BARCODECOUNT)
    If (TwainPRO.CapSupported) Then
        Dim nBarcodeCount as Long   
        nBarcodeCount = TwainPRO.CapValue
    End If
End Sub

See Also

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback